import request from './request';
export function getTimes(params) {   //开标时间查询
    return request({
        url: '/queryBidTime',
        method: 'get',
        params,
    });
}
export function getDirs(params) {   //标准化目录查询
    return request({
        url: '/queryStandardCatalogue',
        method: 'get',
        params,
    });
}
export function getWl(params) {   //物料清单查询
    return request({
        url: '/queryMaterialList',
        method: 'get',
        params,
    });
}
export function getGw(params) {   //固网参考价信息查询
    return request({
        url: '/queryErpReferencePrice',
        method: 'get',
        params,
    });
}

export function getKl(params) {   //物资库龄信息查询
    return request({
        url: '/queryInventory',
        method: 'get',
        params,
    });
}

export function getGhid(params) {   //ECP固化ID信息查询
    return request({
        url: '/queryWeldingIdStatus',
        method: 'get',
        params,
    });
}

export function kbExport(data) {   //开标时间导入
    return request.post('/impBidTime', data)
}

export function login(data) {   //登录
    return request.post('/user/login', data)
}

export function geTAccout(params) {   //账号管理
    return request({
        url: '/user/queryUserList',
        method: 'get',
        params,
    });
}

export function toggleUserStatus(id) {   //切换账号状态
    return request({
        url: `/user/toggleUserStatus?userId=${id}`,
        method: 'post',
    });
}

export function resetPassword(id) {   //重置密码
    return request({
        url: `/user/resetPassword?userId=${id}`,
        method: 'post',
    });
}
export function deleteUser(id) {   //删除账号
    return request({
        url: `/user/deleteUser?userId=${id}`,
        method: 'post',
    });
}

export function addUser(params) {   //新增账号
    return request.post('/user/addUser', params)
}

export function updatePasswordr(params) {   //修改密码
    return request.post('/user/updatePassword', params)
}


export function getError(params) {   //异常
    return request({
        url: '/updateErrorStatus',
        method: 'get',
        params,
    });
}
export function deleteMainTask(params) {   //删除
    return request({
        url: '/deleteMainTask',
        method: 'get',
        params,
    });
}